import http from '/@/utils/request'


/**
 * 新增设备管理
 */
export const addEquipment = (data) => {
    return http.request({
        url: '/equipment/add',
        method: 'put',
        data
    })
}
/**
 * 新增设备类型
 */
export const addEquipmentType = (name) => {
    return http.request({
        url: '/equipment/add.type'+name,
        method: 'put',
        data
    })
}
/**
 * 查询设备管理列表
 */
export const listEquipment = (query) => {
    return http.request({
        url: '/equipment/list',
        method:'get',
        params:query
    })
}
/**
 * 查询设备类型列表
 */
export const listEquipmentType = (name) => {
    return http.request({
        url: '/equipment/list.type?name='+name,
        method:'get'
    })
}

/**
 * 删除设备管理
 */
export const delEquipment = (data) => {
    return http.request({
        url: '/equipment/delete',
        method: 'put',
        data
    })
}

/**
 * 删除设备管理
 */
export const delEquipmentType = (data) => {
    return http.request({
        url: '/equipment/delete.type' ,
        method: 'put',
        data
    })
}

/**
 * 修改设备管理
 */
export const updateEquipment = (data) => {
    return http.request({
        url: '/equipment/update',
        method: 'put',
        data
    })
}
